<script type="text/javascript">
$(function(){
//	$.get("inventorymanagement/getFilesInfo",getResponseFilesInfo,"json");
	$.get("applicationSingle/getCardInfo",function(data){
		var contentb="<option value='' selected>请选择</option>";
		var i;
		$(data).each(function(n,item){
			for(i=0;i<item.cdProDefinitions.length;i++){
				
				contentb+="<option value="+item.cdProDefinitions[i].cardpCode+">"
				+item.cdProDefinitions[i].cardpName+"</option>"
			}
			$("#cardPNameByQueryInventory").html(contentb);
		});
	},"json");
	$.post("inventorymanagement/getUserAndBanch",function(json){
		var activeUser = json.activeUser;
		var userNo=activeUser.userNo;
		var branchNo=activeUser.branchNo;
		var branchName=activeUser.branchName;
		$("input[name='empNoByQureryInventory']").val(userNo);
		$("input[name='branchNoByQueryInventory']").val(branchNo);
		if(branchNo=="10000000"){
			$.post("tellerManage/getpaperAndBranch",function(json){
				 var contentb="<option value='' >请选择</option>";
				 $(json).each(function(n,item){
					for(i=0;i<item.branchs.length;i++){
						contentb+="<option value="+item.branchs[i].orgNo+">"
						+item.branchs[i].orgName+"</option>"
					};
					$("select[name='branchNameByQueryInventory']").html(contentb);
				 });
			 },"json"); 
		}
		if(branchNo!="10000000"){
			var contentb="";
			contentb+="<option value="+branchNo+">"
			+branchName+"</option>"
			$("select[name='branchNameByQueryInventory']").html(contentb);
		}
		var branchNoToquery="";
		if(branchNo!="10000000"){
			branchNoToquery = branchNo;
		}
		$.post("inventoryQueryOfAmountAtBranch/getInventoryInfo",{"branchNameByQueryInventory":branchNoToquery},getInventoryInfo,"json");
		
	});
	
	
	
});

function validateCheckBoxOR(){
	$("input[name='cardReceivingtasked']").attr("checked",true);
	if(!$("input[name='cardReceivingtasked']:checked")[0]){
		alertMsg.warn("请确认是否有配送信息！")	
	}
} 
</script>	

<div class="pageHeader ">

	<form id="pagerForm" method="post" action="inventoryQueryOfAmountAtBranch/getInventoryInfo" class="pageForm required-validate" onsubmit="return validateCallback(this,getInventoryInfo);">

		<input type="hidden" name="pageNum" value="" /> 
		<input type="hidden" name="numPerPage" value="" />
		<input name="empNoByQureryInventory" type="hidden" value="">
		<input name="branchNoByQueryInventory" type="hidden" value="">
		<div class="searchBar">	
			<table class="searchContent">
			<tr>
				<td><label>网点名称：</label></td>
				<td style="text-align:left;"><select id="branchNameByQueryInventory" name="branchNameByQueryInventory" ></select></td>
			</tr>
            <tr>
            	<td><label>卡产品名称：</label></td>
				<td style="text-align:left;"><select id="cardPNameByQueryInventory" name="cardPNameByQueryInventory" ></select></td>		
			</tr> 
			</table>
		<div class="subBar">
			<ul> 
				<li>
				<div class="buttonActive" ><div class="buttonContent" ><button type="submit">查询</button></div></div>
				</li>
			</ul>
		</div>
		</div>
	</form>	
</div>
<div class="pageContent">
<form method="post" action="" class="pageForm required-validate" onsubmit="return validateCallback(this,printViewPageAjaxDone);" >
<div class="panelBar">
	<ul class="toolBar">
		<li><a id="printTable" class="add" onclick="printTableInfo(this);" url="queryInventoryInfo" name="库存查询"><span>打印预览</span></a></li>
	</ul>
</div>
<div id="queryInventoryInfo">
		<table class="table" width="800" height="100">
			<thead>
				<tr>
					<th width="2%" align="center">序号</th>
					<th width="5%" align="center">库存位置</th>
					<th width="10%" align="center">网点名称</th>
					<th width="8%" align="center">卡产品名称</th>
					<th width="8%" align="center">卡物理类型</th>
					<th width="5%" align="center">卡库存分类</th>
					<th width="5%" align="center">库存数量</th>  
					<th width="8%" align="center">详细</th>              
				</tr>
			</thead>
			<tbody id="queryInventoryTable">
			</tbody>
		</table>
</div>
</form>
</div>

	



